<?php
	class filemanagementmodel extends Model {
		function filemanagementmodel()
		{
			parent::Model();			
		}
		
		function update($data)
		{			
            $this->db->where('position', $data['position']);
            $this->db->set('update_date', 'NOW()', FALSE); 
            $this->db->set('update_by', "'". $this->session->userdata('username') ."'", FALSE);
			$this->db->update('file_management', $data); 
		}
		
		
		function getByPostion($position)
		{
//			$this->output->enable_profiler(TRUE);
			$this->db->where('position', $position);
			$query = $this->db->get_where('file_management');
			return $query->row_array();
		}
	}
?>